package com.xmall.controller.wx;

import com.xmall.bean.vo.BaseRespVo;
import com.xmall.bean.vo.IndexGroupGoodsVO;
import com.xmall.bean.vo.WxCommentListVo1;
import com.xmall.service.WxCommentService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

@RestController
@RequestMapping("wx/comment")
public class WxCommentController {
    @Autowired
    WxCommentService wxCommentService;

    @RequestMapping("list")
    public BaseRespVo wxCommentList(Integer valueId,
                                    Byte type,
                                    Integer size,
                                    Integer page,
                                    Integer showType) {
        WxCommentListVo1 wxCommentListVo1 =
                wxCommentService.wxCommentList(valueId, type, size, page, showType);

        return BaseRespVo.ok(wxCommentListVo1);
    }

    @RequestMapping("count")
    public BaseRespVo wxCommentCount(Integer valueId, Byte type){
        HashMap<String, Integer> map = wxCommentService.wxCommmentCount(valueId, type);
        return BaseRespVo.ok(map);
    }


}
